Eclipse Platform
Pre-release 3.0

org.eclipse.team.ui.synchronize
Class TeamSubscriberParticipantLabelProvider

java.lang.Object
  extended byorg.eclipse.jface.viewers.LabelProvider
      extended byorg.eclipse.team.ui.synchronize.TeamSubscriberParticipantLabelProvider
All Implemented Interfaces:
IBaseLabelProvider, IColorProvider, ILabelProvider, ITableLabelProvider

public class TeamSubscriberParticipantLabelProvider
extends LabelProvider
implements ITableLabelProvider, IColorProvider

Provides basic labels for the subscriber participant synchronize view page. This class provides a facility for subclasses to define annotations on the labels and icons of adaptable objects by overriding decorateText() and decorateImage.

Since:
3.0
See Also:
TeamSubscriberParticipantPage.getLabelProvider()

Constructor Summary
TeamSubscriberParticipantLabelProvider()
           
 
Method Summary
protected  Image decorateImage(Image base, Object resource)
           
protected  String decorateText(String input, Object resource)
           
 void dispose()
          Disposes of this label provider.
 Color getBackground(Object element)
          Provides a background color for the given element.
 Image getColumnImage(Object element, int columnIndex)
          Returns the label image for the given column of the given element.
 String getColumnText(Object element, int columnIndex)
          Returns the label text for the given column of the given element.
 Image getCompressedFolderImage()
           
 Color getForeground(Object element)
          Provides a foreground color for the given element.
 Image getImage(Object element)
          An image is decorated by at most 3 different plugins.
 String getText(Object element)
          The LabelProvider implementation of this ILabelProvider method returns the element's toString string.
 
Methods inherited from class org.eclipse.jface.viewers.LabelProvider
addListener, fireLabelProviderChanged, isLabelProperty, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider
addListener, isLabelProperty, removeListener
 

Constructor Detail

TeamSubscriberParticipantLabelProvider

public TeamSubscriberParticipantLabelProvider()
Method Detail

getCompressedFolderImage

public Image getCompressedFolderImage()

decorateText

protected String decorateText(String input,
                              Object resource)

decorateImage

protected Image decorateImage(Image base,
                              Object resource)

getText

public String getText(Object element)
Description copied from class: LabelProvider
The LabelProvider implementation of this ILabelProvider method returns the element's toString string. Subclasses may override.

Specified by:
getText in interface ILabelProvider
Overrides:
getText in class LabelProvider

getImage

public Image getImage(Object element)
An image is decorated by at most 3 different plugins. 1. ask the workbench for the default icon for the resource 2. ask the compare plugin for the sync kind overlay 3. overlay the conflicting image on folders/projects containing conflicts

Specified by:
getImage in interface ILabelProvider
Overrides:
getImage in class LabelProvider

dispose

public void dispose()
Description copied from interface: IBaseLabelProvider
Disposes of this label provider. When a label provider is attached to a viewer, the viewer will automatically call this method when the viewer is being closed. When label providers are used outside of the context of a viewer, it is the client's responsibility to ensure that this method is called when the provider is no longer needed.

Specified by:
dispose in interface IBaseLabelProvider
Overrides:
dispose in class LabelProvider

getColumnImage

public Image getColumnImage(Object element,
                            int columnIndex)
Description copied from interface: ITableLabelProvider
Returns the label image for the given column of the given element.

Specified by:
getColumnImage in interface ITableLabelProvider
Parameters:
element - the object representing the entire row, or null indicating that no input object is set in the viewer
columnIndex - the zero-based index of the column in which the label appears

getColumnText

public String getColumnText(Object element,
                            int columnIndex)
Description copied from interface: ITableLabelProvider
Returns the label text for the given column of the given element.

Specified by:
getColumnText in interface ITableLabelProvider
Parameters:
element - the object representing the entire row, or null indicating that no input object is set in the viewer
columnIndex - the zero-based index of the column in which the label appears

getForeground

public Color getForeground(Object element)
Description copied from interface: IColorProvider
Provides a foreground color for the given element.

Specified by:
getForeground in interface IColorProvider
Parameters:
element - the element
Returns:
the foreground color for the element, or null to use the default foreground color

getBackground

public Color getBackground(Object element)
Description copied from interface: IColorProvider
Provides a background color for the given element.

Specified by:
getBackground in interface IColorProvider
Parameters:
element - the element
Returns:
the background color for the element, or null to use the default background color

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.